package lab02.test22;

import java.util.Scanner;

public class Test22 {
    public static void main(String[] args) {
        Scanner ch = new Scanner(System.in);
        System.out.println("请输入一个字符串.");
        String str = ch.nextLine();

        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) >= 'A' && str.charAt(i) <= 'Z') {
                char c = (char) (str.charAt(i) + 32);
                System.out.print(c);
            } else if (str.charAt(i) >= 'a' && str.charAt(i) <= 'z') {
                char c = (char) (str.charAt(i) - 32);
                System.out.print(c);
            } else if (str.charAt(i) >= '0' && str.charAt(i) <= '9') {
                System.out.print("0");
            } else {
                System.out.print("#");
            }
        }
    }
}
